package com.pi.community.common.enumeration;

public enum TriggerTypeEnum {
    /**
     * 报警类型 ALARM 2
     * 报警类型（请使用位操作来判断当前的报警状态，如果为0则表示未触发报警）
     * 0x01：翘锁报警  1
     * 0x02：假锁报警  10
     * 0x04：电池欠压报警  100
     * 0x08：禁试报警   1000
     * 0x10：水浸报警   10000
     * 0x20：高温报警    100000
     */
    PICK_ALARM(21,"撬锁报警",0),
    SPURIOUS_ALAMR(22,"假锁报警",1),
    BATTERY_ALAMR(24,"电池欠压报警",2),
    FINGER_ALARM(25,"指纹报警"),
    PWD_ALARM(26,"密码报警"),
    RETRY_FORBIDDEN_ALARM(28,"禁试报警",3),
    WATEROUT_ALARM(216,"水浸报警",4),
    HIGH_TEMPERATURE_ALARM(232,"高温报警",5);


    private int code;
    private String name;
    private int position = -1;
    private TriggerTypeEnum(int code,String name){
        this.code = code;
        this.name = name;
    }

    private TriggerTypeEnum(int code,String name,int position){
        this.code = code;
        this.name = name;
        this.position = position;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }
}
